
#pragma once

#include "Control\Control.h"
#include "AlphaRes.h"
#include "BaseICtrl.h"

class  GUI_API CFAlpResIcon
:public CBaseICtrl
{
public:
	CFAlpResIcon(void);
	CFAlpResIcon(UINT nID );
	CFAlpResIcon(wstring strCaption,UINT nID );
	CFAlpResIcon(DWORD dwStyle,wstring strCaption, const CRect &rc, UINT nID  );
	CFAlpResIcon(DWORD dwStyle, wstring strCaption, int x, int y, int cx, int cy, UINT nID  );

	virtual ~CFAlpResIcon(void);

public:
	virtual void	Click(DWORD dwClick, POINT pt);
	virtual void	Paint(CDC* pDC);
	virtual void	ImprovePaint( HANDLE hDB ,HDC hdc =NULL );
	void			Init();

public:
	// conctrol only have one image
	virtual BOOL	LoadRes( wstring strRes,CMyUnCompress* pPack=NULL );
	//if contrl only have one img,this function just like LoadRes,here the same
	virtual BOOL	LoadStateRes( wstring strRes,int nState,CMyUnCompress* pPack =NULL );


protected:
	CFAlphaRes*		m_pAlpRes;

};
